﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Saker.Kernel.BLL;

namespace Saker.Web.Boss
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void loginbtn_Click(object sender, EventArgs e)
        {
            string name = user_name.Text.Trim();
            string pass = user_password.Text.Trim();
            if (new SysUserBLL().UserLogin(name, pass))
            {
                Response.Redirect("Main.aspx");
            }
            else
            {
                ScriptManager.RegisterStartupScript((Page)this, this.Page.GetType(), "alert", "alert('对不起，您未能登录，请检查是否存在此用户,或者密码是否正确');", true);
            }
        }
    }
}